package com.jiawa.wiki.controller;

import com.jiawa.wiki.domain.Demo;
import com.jiawa.wiki.service.DemoService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * DemoController
 *
 * @author 荀彧 2021/5/17
 */
@RestController
@RequestMapping(value = "/demo")
public class DemoController {

    @Resource
    private DemoService service;

    @RequestMapping(value = "/list", method = RequestMethod.GET)
    public List<Demo> list() {
        return service.list();
    }
}

